<!--<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="apple-mobile-web-app-capable" content="yes" />
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="<?php echo $this->config->base_url(); ?>assets/js/jquery-1.7.min.js"></script>
<link href="<?php echo $this->config->base_url(); ?>assets/css/bootstrap-responsive.css" rel="stylesheet">
<link href="<?php echo $this->config->base_url(); ?>assets/css/bootstrap.min.css" rel="stylesheet">
<link href="<?php echo $this->config->base_url(); ?>assets/css/style.css" rel="stylesheet">
<script type="text/javascript" src="<?php echo $this->config->base_url(); ?>assets/js/bootstrap.min.js"></script>
<script type="text/javascript" src="<?php echo $this->config->base_url(); ?>assets/js/mouseover_popup.js"></script>
<script type="text/javascript" src="<?php echo base_url();?>/assets/DataTables/media/js/jquery.js"></script>
<script type="text/javascript" src="<?php echo base_url();?>/assets/DataTables/media/js/jquery.dataTables.js"></script>-->
<script type="text/javascript">
	$(document).ready(function() {
	  //	alert('asd');
	      $('#fileData').dataTable( {
					"aLengthMenu": [[10, 25, 50, 100, -1], [10, 25, 50, 100, "All"]],
					"sPaginationType": "full_numbers",	
                    "aaSorting": [[ 0, "desc" ]],
                    "iDisplayLength": 25,
					"bJQueryUI": true,
					"sDom": '<"H"frlT><"clear">t<"clear"><"F"ip>',
					'bProcessing'    : true,
					'bServerSide'    : true,
					'sAjaxSource'    : '<?php echo site_url(); ?>',
					'fnServerData': function(sSource, aoData, fnCallback)
					{
					  $.ajax
					  ({
						'dataType': 'json',
						'type'    : 'POST',
						'url'     : sSource,
						'data'    : aoData,
						'success' : fnCallback
					  });
					},	
						
					"oTableTools": {
						
						"aButtons": [
								// "copy",
								"csv",
								"xls",
								{
									"sExtends": "pdf",
									"sPdfOrientation": "landscape",
									"sPdfMessage": ""
								},
								"print"
						]
					},
					"oLanguage": {
					  "sSearch": "Filter: "
					},
					"aoColumns": [ 
					   null,null,null,
					  { "bSortable": false }
					]
					
                } );
	  })
	  function download(){
	  	
	  }
</script>
<div class="row-fluid">
<div class="span6"><h3>Uploaded List</h3></div>
<!--<div class="span6" align="right"  ><a data-toggle="modal" href="#myModal" class="btn btn-primary btn-medium">Upload File</a></div>-->
<!--Modal-->
<!--<div class="modal fade" id="myModal">
    <div class="modal-dialog">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
          <h4 class="modal-title">Add more files</h4>
        </div>
        <div class="modal-body">
			<?php echo form_open_multipart('upload/do_adupload/');?>
				<table>
				<tr>
					<td>Input file:	</td>
				</tr>
				<tr>
					<td><input type="file" size="20" name="userfile[]" multiple="multiple" /></td>
				<td>
				</tr>
				<tr>	
				<td><input class="btn btn-primary" type="submit" name="submit" id="submit" value="submit"></td>
				</tr>
				</table>
				<td><?php echo form_close(); ?></td>
        </div>
        <div class="modal-footer">
          <a href="#" class="btn">Close</a>
          <a href="#" class="btn btn-primary">Save changes</a>
        </div>
      </div>
    </div>
  </div>-->
<!--/Modal-->  
</div>
<table id="fileData" cellpadding=0 cellspacing=10 width="100%" class="table table-bordered">
<thead>
	<th>Thumbnails</th>
	<th>Files Type</th>
	<th>Date</th>
</thead>
<tbody>
	<tr>
	<!--<td>	
	<?php foreach($query->result() as $row){ 
	$id =$row->id;	
	$text = $row->textarea;
	echo $text;	
	echo "</br>";
	};
	?> 
	</td>-->
	<td>
	
		<?php foreach($query->result() as $row):?>
		<?php $id =$row->id;?>
		<?php echo form_open_multipart('user/upload/checkremoveAll_file/'.$id); ?>
	<?php
		$id =$row->id;  
		//echo $id; exit();
		$file =$row->userfile;?>
		<input type="checkbox" name="filecheck[]" value="<?php echo $id; ?>" />
		<div style="display: none; position: absolute; z-index: 110; left: 400; top: 100; width: 15; height: 15" id="preview_div"></div>
		<a href="#" onmouseover="showtrail('<?php echo $this->config->base_url().'/uploads/resized/'.$file;?>','<?php $file ?>')" onmouseout="hidetrail()"><img src="<?php echo $this->config->base_url().'/uploads/thumbs/'.$file;?>"></a>
		&nbsp;&nbsp;&nbsp;
		<?php echo anchor('user/upload/do_download/'.$id,$file); ?>
		<div style="font-size:12px;"><?php echo $this->config->base_url().'/uploads/main/'.$file;?></div>
		<?php echo"</br>"; ?>
		<?php echo"</br>"; ?>	
	<?php endforeach; ?>
	<!--<input type="button" id="download" name="download" value="download" />-->
	<!--<?php $attributes = 'class = "btn btn-primary"'; ?>-->
	<input type="submit" id="multi_download" name="multi_download" value="Download" class="btn btn-primary">
	<!--<?php echo anchor('upload/do_multi_download/'.$id,'Download',$attributes); ?>-->
	
	<!--<?php $attribute = 'class = "btn btn-danger"'; ?>
	<?php echo form_submit('delete','Delete',$attribute); ?>-->
	<input type="submit" id="multi_delete" name="multi_delete" value="Delete" class="btn btn-danger">
	<?php echo form_close(); ?>
	</td>
	<td>
	<?php foreach($query->result() as $row):?>
	<?php
		$id =$row->id;  
		$file =$row->userfile;?>
		<?php echo anchor('user/upload/do_download/'.$id,$file); ?>
		<?php echo anchor('user/upload/removewhole_file/'.$id,'<i class="icon-trash"></i>'); ?>	
		<?php echo"</br>"; ?>
		<?php echo"</br>"; ?>
		<?php echo"</br>"; ?>
		<?php echo"</br>"; ?>
	<?php endforeach; ?>	
	</td>
	<td>
		<?php foreach($query->result() as $row){
		$time = $row->time;
		echo $time;
		echo "</br>";
		echo "</br>";
		echo "</br>";
		echo "</br>";
		}
		?>
	</td>	
</tr>
</tbody>
</table>